package io;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

/**
 * @version 1.8
 * @Author Djx_hmbb
 * @Date 2023/8/30 16:24
 * @注释:输出流--更推荐的写法
 */
public class IODemo8 {
    public static void main(String[] args) throws IOException {
        try(OutputStream outputStream = new FileOutputStream("./ddd.txt")){
            outputStream.write(97);
            outputStream.write(98);
            outputStream.write(99);
            outputStream.write(100);
        }//try执行完后,会自动调用close
    }
}
